package com.fwc.churchtracker.messaging;

import javax.servlet.ServletContext;

public class ShoutService extends MessagingService {

    public ShoutService(ServletContext servletContext, String toAddress) {
		super(servletContext, toAddress);
	}

	public String receive(String fromAddress, String body) {	
/*
 			ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(context);
		    DataStoreService dss = (DataStoreService) ac.getBean("dataStoreService");
			Member fromMember = (Member) dss.findByEmail(Member.class,fromAddress);
		    Shout s = new Shout();
		    s.setMessage(body.replaceAll("\\n", "<BR />"));
		
		    if(null!=fromMember) {
		    	s.setFromKey(KeyFactory.stringToKey(fromMember.getKey()));
		    	dss.save(s);
		        
		        return "Thanks for the shout, " + fromMember.getFirstName()+"!";
		    } else {
		    	return "Sorry, " + fromAddress+".  We can't find you in our system!";
		    }
		    */
		return "";
	   }
	
}
